package com.haiya.identityaccess.application.representation;

import com.haiya.identityaccess.domain.identity.model.Tenant;

/**
 * @author qiaoguoqiang
 */
public class TenantRepresentation {
    private String id;
    private String name;
    private boolean enabled;
    private String description;

    public TenantRepresentation(Tenant aTenant) {
        super();

        this.initializeFrom(aTenant);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    protected TenantRepresentation() {
        super();
    }

    private void initializeFrom(Tenant aTenant) {
        this.id = aTenant.tenantId().id();
        this.name = aTenant.name();
        this.description = aTenant.description();
        this.enabled = aTenant.isActive();
    }
}
